﻿<ion-view>
 
    <ion-content class='index-home'>
    	
       <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
		<div class="index-head-img">
           <!-- <img style='padding-left:60px;width:60px;height:60px;' src="img/home2/4.png"> -->
            
       </div>
       <div class="index-online-number">
             <span>在线人数：</span><i><span ng-bind="onlineCount">0</span></i>
       </div>
        <div>
            
           <!--  <div class="home-north">
                <div class="home-n-bg-b"></div>
            </div> -->
            <div class="home-cover">
                <div class="wrapper">
                    <img src="img/home2/2.png">
                </div>
            </div>
            <div class="index-tip">
                	斗牛士棋牌上线啦！快喊小朋友来玩哦吧，快抢千万红哦！
            </div>
            <div class="home-cover">
                <div ng-click="join({'type':'G07', 'id':'LHH0001','name':'龙虎合'})"  class="wrapper">
                    <img  src="img/home2/3.png">
                </div>
            </div>
        </div>

        <ion-list>
            <ion-item ng-repeat="gameType in gameTypes" class="game-group"
                      ng-if="rooms[gameType.key] && rooms[gameType.key].length">
                <div class="game-type-bar clearfix">
                    <div class="game-icon clearfix">
                        <img src="img/home2/11.png">
                        <span class="group-name">{{gameType.text}}</span>
                    </div>
                    <div class="group-collapse clearfix" ng-click="collapseRoomGroup(gameType.key)">
                        <i ng-class="{true: 'ion-ios-arrow-down', false: 'ion-ios-arrow-up', undefined: 'ion-ios-arrow-up'}[gameTypeHideStatus[gameType.key]]"></i>
                        <span>收起</span>
                    </div>
                </div>
                <div class="home-rooms" ng-show="!gameTypeHideStatus[gameType.key]" >
                    <div class="room-row clearfix" ng-repeat="row in rooms[gameType.key]">
                        <div class="home-room" ng-repeat="room in row" ng-click=join(room)>
                            <div ng-class="{'home-room-out':room.type== 'G022', 'home-room-out-saolei':room.type== 'G04'}">
                            
                                <div class="home-room-in">
                                    <div ng-class="{'room-name-saolei':room.type== 'G04','room-name':room.type== 'G022'}" ><b>{{room.name2}}</b></div>
                                    <div class="room-desc"><b>{{room.desc}}</b></div>
                                    <div class="room-limit">
                                        <div>在线人数：{{room.position}}人</div>
                                        <div>限{{room.limitNum}}人</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
				
				
            </ion-item>
        </ion-list>
    </ion-content>
</ion-view>
